<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<jsp:include page="/WEB-INF/views/common/header.jsp" />

<link rel="stylesheet" href="<c:out value="${pageContext.request.contextPath}"/>/resources/common/bootstrap/css/bootstrap-datepicker.min.css">

<script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/resources/js/repair_create_popup.js"></script>
<script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/resources/common/bootstrap/js/bootstrap-datepicker.min.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		var firstdate;
		
		var startdate = $('#release_start_date').datepicker({
			format: "yyyy-mm-dd",
			autoclose: true,
			todayHighlight: true
		}).on('changeDate', function(ev) {
			firstdate = ev.date.valueOf();
		});
		
		$('#release_end_date').datepicker({
			format: "yyyy-mm-dd",
			autoclose: true,
			todayHighlight: true,
		});
	});
	
</script>

</head>
<body>
	<jsp:include page="/WEB-INF/views/main/menu.jsp" />

	<div class="container">
		<div class="page-header">
			<h3>수리 요청 출고증</h3>
		</div>
		<form class="form-inline">
			<h4>출고 대상 조회 조건</h4>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="repair_order_dept" style="width: 100px;">수리요청 부서</label> 
						<input type="text" class="form-control" id="repair_order_dept_code" placeholder="부서 코드" disabled>
						<div class="input-group">
							<input type="text" class="form-control" id="repair_order_dept_name" placeholder="부서명" disabled> 
							<span class="input-group-btn"> 
								<input type="button" class="btn btn-primary btn-sm" id="repiar_order_dept_btn" value="선택" />
							</span>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="release_term" style="width: 100px">출고기간</label> 
						<div class="input-group date" id="release_start_date">
  							<input type="text" class="form-control" size="16" disabled="disabled">
  								<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
						</div>
						<label class="control-label" for="release_term" style="width: 100px; text-align:center;">~</label> 
						<div class="input-group date" id="release_end_date">
  							<input type="text" class="form-control" size="16" disabled="disabled">
  								<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
						</div>
					</div>
				</div>
			</div>
			<p />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="repair_center" style="width: 100px">수리처</label> 
						<input type="text" class="form-control" id="repair_center_code" placeholder="수리처 코드" disabled>
						<div class="input-group">
							<input type="text" class="form-control" id="repair_center_name" placeholder="수리처 명" disabled> 
							<span class="input-group-btn"> 
								<input type="button" class="btn btn-primary btn-sm" id="repair_center_btn" value="선택" />
							</span>
						</div>
					</div>
				</div>
				<div class="col-sm-push-4 col-sm-2">
					<a href=""><input type="button" class="btn btn-primary btn-sm btn-block" id="print_btn" value="출력"></a>
				</div>
			</div>
		</form>
		<p />
		<br />
		<table data-toggle="table"
			<%-- data-url="<c:out value="${pageContext.request.contextPath}"/>/resources/test_data/data.json" --%>
			data-height="250" data-pagination="true" data-search="false">
			<thead>
				<tr>
					<th data-field="state" data-checkbox="true"></th>
					<th data-field="no" data-align="center" >No</th>
					<th data-field="repair_release_no" data-align="center">수리요청 출고번호</th>
					<th data-field="repair_company" data-align="center">수리처</th>
					<th data-field="repair_dept" data-align="center">수리요청 부서</th>
					<th data-field="repair_release_day" data-align="center">수리요청출고일</th>
				</tr>
			</thead>
		</table>
		<p />
		<hr />
		<table data-toggle="table"
			<%-- data-url="<c:out value="${pageContext.request.contextPath}"/>/resources/test_data/data.json" --%>
			data-height="600" data-pagination="true" data-search="false">
			<thead>
				<tr>
					<th data-field="state" data-checkbox="true"></th>
					<th data-field="no" data-align="center">No</th>
					<th data-field="serial_no" data-align="center">Serial No.</th>
					<th data-field="item_code" data-align="center">품목코드</th>
					<th data-field="item_name" data-align="center">품명</th>
					<th data-field="before_repair" data-align="center">이전 수리처</th>
					<th data-field="customer_name" data-align="center">고객명</th>
					<th data-field="last_repair_day" data-align="center">최종수리일</th>
					<th data-field="vendor_warr" data-align="center">Vendor Warr</th>
					<th data-field="deadline" data-align="center">납기일</th>
					<th data-field="mfg_date" data-align="center">Mfg Date</th>
					<th data-field="customer_claim_check" data-align="center">고객청구 여부</th>
					<th data-field="model_code" data-align="center">기종코드</th>
					<th data-field="revision" data-align="center">REVISION</th>
					<th data-field="repair_type" data-align="center">수리 유형</th>
					<th data-field="renovating_degree" data-align="center">재수리 차수</th>
					<th data-field="ro_line_id" data-align="center">RO Line ID</th>
					<th data-field="ro_header_id" data-align="center">RO Header ID</th>
				</tr>
			</thead>
		</table>
	</div>
	<div class="modal fade" role="dialog" id="modalDiv">
		<div class="modal-dialog">
			<div class="modal-content"></div>
		</div>
	</div>
</body>
</html>